# if 判断
# 简单判断
age = 14
if age >= 18:
    print('yes')
else:
    print('NO')

# 输入用户名和密码，判断是否正确
username = input('input username: ')
password = input('input password: ')
if username == 'admin' and password == '123456':
    print('YES')
else:
    print("NO")

# 数值的隐式转换
# 任意数值 -> True, 0 -> False
if 2:
    print('int -> True')
if 0:
    print('int -> False')

# 字符串的隐式转换
# 任意字符串 -> True, 空字符串 -> False
if 'hello':
    print('str -> True')
if '':
    print('str -> False')   

# None的隐式转换 False
if None:
    print('None -> True')
else:
    print('None -> False')
# None 转True
if not None:
    print('None -> True')    

# 列表的隐式转换
# 非空列表 -> True，空列表 -> False
if ['nus', 'sjkd']:
    print("list -> True")
if []:
    print('list -> False')

# 多项判断 if嵌套
sorce = int(input("input sorce: "))
if not 0 <= sorce <= 100:
    print("! sorce")
elif sorce >= 90:
    print('A')
elif sorce >= 80:
    print('B')
elif sorce >= 70:
    print('C')
elif sorce >= 60:
    print('D')
else:
    print('E')




